#include <iostream>
#include <clocale>
#include "Veicle.h"
#include "Lorry.h"
#include "MotorCycle.h"
#include "Car.h"
#include "SportsCar.h"
#include "FamilyCar.h"

using namespace std;

int main5()
{
	cout << "Main 5" << endl << endl;

	Veicle v("Rover",1923);
	Lorry l("Scania", 1971, 10500);
	MotorCycle m("Triumph", 1956, 2);
	Car c("Opel", 1982, 4, 4);
	SportsCar sc("Ferrari", 1997, 2, 4, 250);
	FamilyCar fc("Volvo", 2005, 4, 5);

	Veicle::Print(v);
	Veicle::Print(l);
	Veicle::Print(m);
	Veicle::Print(c);
	Veicle::Print(sc);
	Veicle::Print(fc);

	try
	{
		FamilyCar fc1("Volvo", 2005, 4, 5);
	}
	catch(VeicleException &ve)
	{
		cout << "Fel vid skapande av fc1!" << endl;
		ve.Report();
	}
	//Veicle::Print(v1);
	try
	{
		SportsCar sc1("Ferrari", 1823, 2, 4, 250);
	}
	catch(VeicleException &ve)
	{
		cout << "Fel vid skapande av sc1!" << endl;
		ve.Report();
	}
	//Veicle::Print(v2);

	return 0;
}

int main()
{
	setlocale(LC_ALL,"swedish");
	main5();

	return 0;
}